--[[
    As long there are no other methods, acid is gained out of fermentation of must
]]

if minetest.get_modpath("technic_farming") == nil then

	local recipes = {
		{"default:apple 16",      "bucket:bucket_empty",    "technic_batteries:bucket_must_apple", 12},
		{"default:apple 4",       "vessels:drinking_glass", "technic_batteries:glass_must_apple", 6},
		{"default:apple 8",       "vessels:glass_bottle",   "technic_batteries:bottle_must_apple", 3},
		{"farming:blackberry 16", "bucket:bucket_empty",    "technic_batteries:bucket_must_blackberry", 12},
		{"farming:blackberry 4",  "vessels:drinking_glass", "technic_batteries:glass_must_blackberry", 6},
		{"farming:blackberry 8",  "vessels:glass_bottle",   "technic_batteries:bottle_must_blackberry", 3},
		{"farming:grapes 16",     "bucket:bucket_empty",    "technic_batteries:bucket_must_grapes", 12},
		{"farming:grapes 4",      "vessels:drinking_glass", "technic_batteries:glass_must_grapes", 6},
		{"farming:grapes 8",      "vessels:glass_bottle",   "technic_batteries:bottle_must_grapes", 3},
		{"farming:rhubarb 16",    "bucket:bucket_empty",    "technic_batteries:bucket_must_rhubarb", 12},
		{"farming:rhubarb 4",     "vessels:drinking_glass", "technic_batteries:glass_must_rhubarb", 6},
		{"farming:rhubarb 8",     "vessels:glass_bottle",   "technic_batteries:bottle_must_rhubarb", 3},
	}

	for _, data in pairs(recipes) do
		local alloy_time = data[4] or 1
		local b_registered = true
		for i=1,3 do
			local item_name = string.split(data[i],' ')[1]
			b_registered = b_registered and (minetest.registered_items[item_name] ~= nil)
		end
		if b_registered then
			technic.register_alloy_recipe({input = {data[1], data[2]}, output = data[3], time = data[4]})
		end
	end
end